<?php
	include_once "config_db.php";
	include_once "read_xml.php";
	$database = 'mymap';
	
	if (!mysql_connect($db_host, $db_user, $db_pwd))
	die("Can't connect to database");
		
	if (!mysql_select_db($database))
	die("Can't select database");
		
	mysql_query("SET NAMES 'utf8'");
	
	$function_name = $_REQUEST['function_name'];
	if($function_name == 'getWay') {
		$way_id = $_REQUEST['way_id'];
		getWay($way_id, true);
	} elseif($function_name == 'getRelation') {
		$relation_id = $_REQUEST['relation_id'];		
		getRelation($relation_id, true);
	} elseif($function_name == 'insert_AllNode') {	
		insert_AllNode();
	} elseif($function_name == 'insert_AllSegment') {	
		insert_AllSegment();
	}
?>